let CatalogsParser = require('./ZJParsers/CatalogsParser');
let CatalogsItemParser = require('./ZJParsers/CatalogItemParser');
let QuestionsParser = require('./ZJParsers/QuestionsParser');

class ParserFactory {
    constructor(type) {
        if(type && this[type]) 
            return this[type]()
        return this;
    }
    catalogsParser() {
        return new CatalogsParser();
    }
    catalogItemParser() {
        return new CatalogsItemParser();
    }
    questionsParser() {
        return new QuestionsParser()
    }
}

module.exports = ParserFactory;